package net.wsfcp.android.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import net.wsfcp.android.bean.resultbean.TabBean;
import net.wsfcp.android.bean.resultbean.UserBean;

import net.wsfcp.android.greendao.gen.TabBeanDao;
import net.wsfcp.android.greendao.gen.UserBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig tabBeanDaoConfig;
    private final DaoConfig userBeanDaoConfig;

    private final TabBeanDao tabBeanDao;
    private final UserBeanDao userBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        tabBeanDaoConfig = daoConfigMap.get(TabBeanDao.class).clone();
        tabBeanDaoConfig.initIdentityScope(type);

        userBeanDaoConfig = daoConfigMap.get(UserBeanDao.class).clone();
        userBeanDaoConfig.initIdentityScope(type);

        tabBeanDao = new TabBeanDao(tabBeanDaoConfig, this);
        userBeanDao = new UserBeanDao(userBeanDaoConfig, this);

        registerDao(TabBean.class, tabBeanDao);
        registerDao(UserBean.class, userBeanDao);
    }
    
    public void clear() {
        tabBeanDaoConfig.clearIdentityScope();
        userBeanDaoConfig.clearIdentityScope();
    }

    public TabBeanDao getTabBeanDao() {
        return tabBeanDao;
    }

    public UserBeanDao getUserBeanDao() {
        return userBeanDao;
    }

}
